// package com.sloera.regext;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * class com.sloera.regext
 * user sloera
 * date 2022/1/11
 */
public class regexReverse {
    public static void main(String[] args) {
        String test = "cba";
        String reg = "(?<=(c?b))a";
        Matcher m = Pattern.compile(reg).matcher(test);
        while (m.find()) {
            System.out.println(m.group());
            System.out.println(m.group(1));
        }
    }
}
